﻿
public class Aircraft extends Machine implements Voyageable,Roadable,Flyable{

    public Aircraft() {
        super(100);
    }


    @Override
    public void voyage() {
        //水中航行一次消耗能量值15
        setEnergy(getEnergy() - 15);
    }

    @Override
    public void run() {
        //陆地行驶一次消耗能量值10
        setEnergy(getEnergy() - 10);
    }

    @Override
    public void fly() {
        //空中飞行一次消耗能量值25
        setEnergy(getEnergy() - 25);
    }


}
